core.php
--------------

//////////////////////////can sign blog comment?

function cansignblogcomment($uid, $who)
{
  if(arebuds($bid, $who))
  {
    return true;
  }
  if($bid==$who)
  {
    return false; //imagine if someone signed his own gbook o.O
  }
  if(getplusses($uid)>=50)
  {
    return true;
  }
  return false;
}
////////////////////////////////////////////is del blog comment

function candelblogcomment($bid,$mid)
{
  $minfo = mysql_fetch_array(mysql_query("SELECT blogowner, blogsigner FROM ibwf_blogcomment WHERE id='".$mid."'"));
  if($minfo[0]==$bid)
  {
    return true;
  }
  if($minfo[1]==$bid)
  {
    return true;
  }
  return false;
}
------------------------------------------

genproc.php
-------------------------------------------


else if($action=="signblogcomment")
{
    $who = $_POST["who"];
  
if(!cansignblogcomment(getuid_sid($sid), $who))
{
        echo "<card id=\"main\" title=\"$sitename\">";
      echo "<p align=\"center\">";
      echo "You cant Sign this user Blog<br/><br/>";
      echo "<a href=\"index.php?action=main&sid=$sid\">Home</a>";
      echo " coded by Vishal";
      echo "</p>";
      echo "</card>";
      echo "</wml>";
      exit();
    }
  $msgtxt = $_POST["msgtxt"];
  //$qut = $_POST["qut"];
  addonline(getuid_sid($sid),"Signing a User's Blog","");
  echo "<card id=\"main\" title=\"$sitename\">";
      echo "<p align=\"center\">";
      $crdate = time();
      //$uid = getbid_sid($sid);
      $res = false;

      if(trim($msgtxt)!="")
      {
        
      $res = mysql_query("INSERT INTO ibwf_blogcomment SET blogowner='".$who."', blogsigner='".$uid."', dtime='".$crdate."', blogmsg='".$msgtxt."'");
      }
      if($res)
      {
        echo "<img src=\"../images/ok.gif\" alt=\"O\"/>Comment Posted Successfully";
      }else{
        echo "<img src=\"../images/notok.gif\" alt=\"X\"/>Error Posting Comment";
      }
      
      echo "<br/><br/>";
      echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
      echo " coded by Vishal";
      echo "</p>";
      echo "</card>";

}

else if($action=="delblogcomment")
{
    $mid = $_GET["mid"];
  addonline(getuid_sid($sid),"Deleting Blog's Comment","");
  echo "<card id=\"main\" title=\"$sitename\">";
  echo "<p align=\"center\">";
  if(candelblogcomment(getuid_sid($sid), $mid))
  {
    $res = mysql_query("DELETE FROM ibwf_blogcomment WHERE id='".$mid."'");
    if($res)
        {
            echo "<img src=\"../images/ok.gif\" alt=\"o\"/>Comment Deleted From Blog<br/>";
        }else{
          echo "<img src=\"../images/notok.gif\" alt=\"x\"/>Database Error!<br/>";
        }
  }else{
    echo "<img src=\"../images/notok.gif\" alt=\"X\"/>You can't delete this Comment";
  }
  echo "<br/><br/>";
  echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo " coded by Vishal";
  echo "</p></card>";
}

----------------------------------------

lists.php
----------------------------------------

///////////////////////////////////Blogs Comment
else if($action=="blogscomment")
{
    $who = $_GET["who"];
    addonline(getuid_sid($sid),"Sending Comment On Blog","");
    echo "<card id=\"main\" title=\"Blogs Comment\">";
    $uid = getuid_sid($sid);
    
    //////ALL LISTS SCRIPT <<

    if($page=="" || $page<=0)$page=1;
    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_blogcomment WHERE blogowner='".$who."'"));
    $num_items = $noi[0]; //changable
    $items_per_page= 5;
    $num_pages = ceil($num_items/$items_per_page);
    if(($page>$num_pages)&&$page!=1)$page= $num_pages;
    $limit_start = ($page-1)*$items_per_page;

    
        $sql = "SELECT blogowner, blogsigner, blogmsg, dtime, id FROM ibwf_blogcomment WHERE blogowner='".$who."' ORDER BY dtime DESC LIMIT $limit_start, $items_per_page";


    echo "<p>";
    $items = mysql_query($sql);
    echo mysql_error();
    if(mysql_num_rows($items)>0)
    {
    while ($item = mysql_fetch_array($items))
    {
        
          if(isonline($item[1]))
  {
    $iml = "<img src=\"../images/onl.gif\" alt=\"+\"/>";
    
  }else{
    $iml = "<img src=\"../images/ofl.gif\" alt=\"-\"/>";
  }
    $snick = getnick_uid($item[1]);
      $lnk = "<a href=\"index.php?action=viewuser&who=$item[1]&sid=$sid\">$iml$snick</a>";
      $bs = date("d m y-H:i:s",$item[3]);
      echo "$lnk<br/><small>";
      if(candelblogcomment($uid, $item[4]))
      {
        $delnk = "<a href=\"genproc.php?action=delblogcomment&sid=$sid&mid=$item[4]\">[x]</a>";
      }else{
        $delnk = "";
      }
      $text = parsepm($item[2], $sid);
      echo "$text<br/>$bs $delnk<br/>";
      echo "</small>";

    }
    }
    echo "</p>";
    echo "<p align=\"center\">";
    if($page>1)
    {
      $ppage = $page-1;
      echo "<a href=\"lists.php?action=$action&page=$ppage&sid=$sid&who=$who\">PREV</a> ";
    }
    if($page<$num_pages)
    {
      $npage = $page+1;
      echo "<a href=\"lists.php?action=$action&page=$npage&sid=$sid&who=$who\">Next</a>";
    }
    echo "<br/>$page/$num_pages<br/>";
    if($num_pages>2)
    {
      $rets = "Jump to page<input name=\"pg\" format=\"*N\" size=\"3\"/>";
        $rets .= "<anchor>[GO]";
        $rets .= "<go href=\"lists.php\" method=\"get\">";
        $rets .= "<postfield name=\"action\" value=\"$action\"/>";
        $rets .= "<postfield name=\"who\" value=\"$who\"/>";
        $rets .= "<postfield name=\"sid\" value=\"$sid\"/>";
        $rets .= "<postfield name=\"page\" value=\"$(pg)\"/>";
        $rets .= "</go></anchor>";

        echo $rets;
    }
    echo "</p>";
  ////// UNTILL HERE >>
    {
    echo "<a href=\"index.php?action=signblogcomment&sid=$sid&who=$who\">";
echo "Add Your Message</a><br/>";
}
    echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo " coded by Vishal";
echo "</card>";
}

-------------------------------------

index.php
-------------------------------------

///////////////////////////////////////////Blog Comment
else if($action=="signblogcomment")
{
$who=$_GET["who"];
addonline(getuid_sid($sid),"Signing Users guestbook","");
if(!cansignblogcomment(getuid_sid($sid), $who))
    {
        echo "<card id=\"main\" title=\"$sitename\">";
      echo "<p align=\"center\">";
      echo "You cant Sign this user Blog<br/><br/>";
      echo "<a href=\"index.php?action=main&sid=$sid\">Home</a>";
      echo " coded by Vishal";
      echo "</p>";
      echo "</card>";
      echo "</wml>";
      exit();
    }
    

    echo "<card id=\"main\" title=\"Sign blog\">";
    echo "<onevent type=\"onenterforward\">";
  echo "<refresh>
        <setvar name=\"msgtxt\" value=\"\"/>
        
   ";
  echo "</refresh></onevent>";

    echo "<p align=\"center\">";
    echo "Text:<input name=\"msgtxt\" maxlength=\"500\"/><br/>";
    echo "<anchor>Add";
    echo "
         <go href=\"genproc.php?action=signblogcomment&sid=$sid\" method=\"post\">
        
         <postfield name=\"msgtxt\" value=\"$(msgtxt)\"/>
        <postfield name=\"who\" value=\"$who\"/>
         </go>
            ";
            echo "</anchor>";

         echo "<br/><br/><a href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"*\"/>";
    echo "Home</a>";
    echo " coded by Vishal";
    echo "</p>";
    echo "</card>";
}
--------------------------------

 index.php find else if($action=="viewblog")
----------------------------------------------------------

$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_blogcomment WHERE blogowner='".$bid."'"));
  echo "<a href=\"lists.php?action=blogscomment&sid=$sid&who=$bid\">Blogs Comment($noi[0])</a><br/>";
-----------------------------------------------------------------------